m = 2
n = 0
flag = True
while flag:
    if n < 23:
        n += 1
    else:
        m += 1
        n = 1
    if m == 23:
        flag = False

    num = m*(m+n)
    if num == 500:
        print "answer is: " + str(m) + " and " + str(n)
        flag = False

if m < n:
    temp = m
    m = n
    n = temp
print "using Euclid's formula, a=m^2-n^2, b=2mn, c=m^2+n^2"
a = m**2-n**2
b = 2*m*n
c = m**2+n**2
print "a = "+str(a)+",b = "+str(b)+",c = "+str(c)

print "abc = "+str(a*b*c)